package main

import (
	"net/http"
	"time"
)

func wait_forever(url string) error {
	const timeout = 1 * time.Minute

	deadline := time.Now().Add(timeout)
	for tires := 0; time.Now().Before(deadline); tires++ {
		_, err := http.Head(url)
		if err == nil {
			return nil
		}
		time.Sleep(time.Second << uint(tires))
	}
}
